<template>
  <el-badge :value="value" :type="type" :max="99" class="item">
    <el-button size="small">{{ text }}</el-button>
  </el-badge>
</template>

<script>
export default {
  name: "BadgeButton",
  props: {
    value: { type: [Number, String], required: true }, // 徽章数字/文字
    text: { type: String, required: true }, // 按钮文字
    type: { type: String, default: "danger" }, // 徽章颜色
  },
};
</script>

<style scoped>
.item {
  /* 统一样式，复用更一致 */
  margin-top: 10px;
  margin-right: 40px;
}
</style>